<?php
namespace app\admin\validate;

use think\Validate;

/**  YSF
 *   套餐验证类
 *   Date: 2018/12/10
 * Class Meal
 * @package app\admin\validate
 */
class Meal extends Validate
{

    /**
     * 验证规则
     * @var array
     */
    protected $rule = [
        'id'           => 'require|number',
    ];

    /**
     * 错误提示
     * @var array
     */
    protected $message = [
        'id.require'        => '参数不能为空',
        'id.number'        => '参数类型错误',
    ];

    /**
     * 应用场景
     * @var array
     */
    protected $scene = [
        // 删除套餐
        'del'          => ['id'],

        // 更改状态
        'status'       => ['id'],
    ];

}